﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ymatou.ServiceCenter
{
    /// <summary>
    /// 服务依赖配置
    /// </summary>
    public class ServiceConfig
    {
        /// <summary>
        /// 服务消费者应用编号
        /// </summary>
        public string ConsumerAppId { get; set; }

        /// <summary>
        /// 服务提供者应用编号
        /// </summary>
        public string ProviderAppId { get; set; }

        /// <summary>
        /// 此服务提供者是否禁止了此服务消费者的访问
        /// </summary>
        public bool IsDisabled { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后一次更新时间
        /// </summary>
        public DateTime LastUpdateTime { get; set; }

        /// <summary>
        /// 最后一次更新时间刻度，用来做客户端与服务端数据同步之用
        /// </summary>
        public long LastUpdateTicks { get; set; }


        public override string ToString()
        {
            return string.Format("ConsumerAppId:{0},ProviderAppId:{1},IsDisabled:{2}", this.ConsumerAppId, this.ProviderAppId, this.IsDisabled);
        }
    }
}
